<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html; charset=utf-8" language="java"
	import="base.tools.Constants,java.util.*" errorPage=""%>
<%@ include file="../../common/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>DBFirewall</title>
<link href="<%=Constants.PREFIX_PATH%>/css/cont.css" rel="stylesheet" type="text/css"/>
<script src="<%=Constants.PREFIX_PATH %>/js/jquery.js" type="text/javascript"></script>
<script src="<%=Constants.PREFIX_PATH %>/js/pony.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="<%=Constants.PREFIX_PATH%>/datePicker/WdatePicker.js"></script>
<script src="<%=Constants.PREFIX_PATH%>/js/menu.js"></script>
<script>
	function Create(tabid, url, name,document) {
				//var list= $('input:radio[name="time"]:checked').val();
				//var before=document.getElementByName('befordtime').value;
				//var last=document.getElementByName('lasttime').value;
				var params = $("#tableForm").serialize();
				var selectedItems = params.split("&");
				var arrinfo=["time","db_user","client_ip","clientmac","program_nm","program","dbobjectparams","db","dbfw","beforetime","lasttime"];
				var newurl="";
				for (var i = 0; i < arrinfo.length; i++) {
					var temp = arrinfo[i];
					newurl=newurl.concat(temp);
					newurl=newurl.concat("=");
					var sum=0;
					for (var j = 0; j < selectedItems.length; j++) {
						var temp2 = selectedItems[j];
						if (temp == temp2.split("=")[0]) {
							sum++;
							if (sum==1) {
								newurl=newurl.concat(temp2.split("=")[1]);
							}else{
								newurl=newurl.concat(",");
								newurl=newurl.concat(temp2.split("=")[1]);
							};
							
						};
					};
					if((i+1)!=arrinfo.length){
						newurl=newurl.concat("&&");
						}
					
				};
				url=url.concat("&&");
				url=url.concat(newurl);
		parent.CreateDiv(tabid, url, name,document);
	}
	function optResult() {
		var f = getTableForm();
		f.action="<%=Constants.PREFIX_PATH%>/SourceAndTargetAction.do?opt=resultAction";
		f.submit();
	}
	
	function getTableForm() {
		return document.getElementById('tableForm');
	}
	function optDelete() {
		var f = getTableForm();
		f.action="<%=Constants.PREFIX_PATH%>/SourceAndTargetAction.do?opt=sensitivityObject&&type=1";
		f.submit();
	}
</script>
</head>
<body class="right_body">
<div class="body-box;height:20px;">
  <div class="rhead">
    <div class="rpos"> 当前位置: 分析助手</div>
    <form class="ropt">
    </form>
    <div class="clear"></div>
  </div>
</div>
<form id="tableForm" method="post" action="<%=Constants.PREFIX_PATH%>/SourceAndTargetAction.do" >
<input type="hidden" name="opt" value="resultAction"/>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"  id="sho1" style="height:100%;">
  <tr>
    <td><div id="wins" >
      <div class="body-box" style="padding:0px,0px,0px,34px;">
       <table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
      
        <tr class="left_topbg">
          <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>数据库实例</strong></td>
          <td class="td_title_text" style="text-align:left"></td>
          <td width="645"></td>
        </tr>
      
        <tr>
          <td class="td_title_find"  colspan="3">
             ${dbtable}
           </td>
        </tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
      
        <tr class="left_topbg">
          <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right">DBFW<strong>实例</strong></td>
          <td class="td_title_text" style="text-align:left"></td>
          <td width="645"></td>
        </tr>
      
        <tr>
          <td class="td_title_find"  colspan="3">
             ${dbfwtable}
            </td>
        </tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
<tr class="left_topbg">
  <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>时间范围</strong></td>
  <td class="td_title_text" style="text-align:left"></td>
  <td width="645"></td>
</tr>
<tr>
  <td class="td_title_find"  colspan="3">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="checkbox-type"><input name="time" type="radio" value="lastmonth"  checked="checked" style="vertical-align: auto">
    上月</td>
                <td  class="checkbox-type"><input name="time" type="radio" value="thismonth"  style="vertical-align: auto">
    本月</td>
                <td class="checkbox-type"><input name="time" type="radio" value="lastweek" style="vertical-align: auto">
    上周</td>
                <td class="checkbox-type"><input name="time" type="radio" value="thisweek" style="vertical-align: auto">
    本周</td>
                <td class="checkbox-type"><input name="time" type="radio" value="yesterday" style="vertical-align: auto">
    昨天</td></tr><tr>
                <td class="checkbox-type"><input name="time" type="radio" value="today" style="vertical-align: auto">
    今天</td>
    			<td class="checkbox-type" colspan="4"><input name="time" type="radio" value="other" style="vertical-align: auto">自定义：
				<input type="text"  name="beforetime"   class="Wdate" id="d4321" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate: '#F{$dp.$D(\'d4322\',{m:-3});}' })"/>
                到<input type="text"  name="lasttime"  class="Wdate" id="d4322" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate: '#F{$dp.$D(\'d4321\',{m:3});}' })"/></td>
    </tr>
              
            </table>
    </td>
</tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
<tr class="left_topbg">
  <td  width="35"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>对象</strong></td>
  <td class="td_title_text" style="text-align:left"></td>
  <td width="645"></td>
</tr>
<tr>
  <td class="td_title_find"  colspan="3">
${dbobjectparams}
</td>
</tr>
</table>
      <table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
      
        <tr class="left_topbg">
          <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>操作类型</strong></td>
          <td class="td_title_text" style="text-align:left"><input name="" type="checkbox" value="" style="vertical-align: auto" onclick='Pn.checkbox("operation",this.checked)'>
            全选</td>
          <td width="645"></td>
        </tr>
      
        <tr>
          <td class="td_title_find"  colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="checkbox-type"><input name="operation" type="checkbox" value="" style="vertical-align: auto">
                  查询</td>
                <td  class="checkbox-type"><input name="operation" type="checkbox" value="" style="vertical-align: auto">
                  统计</td>
                <td class="checkbox-type"><input name="operation" type="checkbox" value="" style="vertical-align: auto">
                  数据维护</td>
                <td class="checkbox-type"><input name="operation" type="checkbox" value="" style="vertical-align: auto">
                  表结构变更</td>
                <td class="checkbox-type"><input name="operation" type="checkbox" value="" style="vertical-align: auto">
                  存储过程变更</td> </tr>
              <tr>
                <td class="checkbox-type"><input name="operation" type="checkbox" value="" style="vertical-align: auto">
                  对象管理</td>
             
                <td class="checkbox-type"><input name="operation" type="checkbox" value="" style="vertical-align: auto">
                  数据库参数</td>
                <td class="checkbox-type"><input name="operation" type="checkbox" value="" style="vertical-align: auto">
                  权限查</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table></td>
        </tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
<tr class="left_topbg">
  <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>用户</strong></td>
  <td class="td_title_text" style="text-align:left"><input name="" type="checkbox" value="" style="vertical-align: auto" checked="checked" onclick='Pn.checkbox("db_user",this.checked)'>
    全选</td>
  <td width="645"></td>
</tr>
<tr>
  <td class="td_title_find"  colspan="3">
${db_user}
</td>
</tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
<tr class="left_topbg">
  <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>IP地址</strong></td>
  <td   class="td_title_text" style="text-align:left"><input name="" type="checkbox" value="" style="vertical-align: auto" checked="checked" onclick='Pn.checkbox("client_ip",this.checked)'>
    全选&nbsp;&nbsp;&nbsp;&nbsp;<a href="">更多&gt;&gt;</a></td>
  <td width="605"></td>
</tr>
<tr>
  <td class="td_title_find"  colspan="3">${client_ip}</td>
</tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
<tr class="left_topbg">
  <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>MAC地址</strong></td>
  <td  class="td_title_text" style="text-align:left"><input name="" type="checkbox" value="" style="vertical-align: auto" checked="checked" onclick='Pn.checkbox("clientmac",this.checked)'>
    全选&nbsp;&nbsp;&nbsp;&nbsp;<a href="">更多&gt;&gt;</a></td>
  <td width="605"></td>
</tr>
<tr>
  <td class="td_title_find"  colspan="3">${clientmac}</td>
</tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
<tr class="left_topbg">
  <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>卖主工具</strong></td>
  <td class="td_title_text" style="text-align:left"><input name="" type="checkbox" value="" style="vertical-align: auto" checked="checked" onclick='Pn.checkbox("program_nm",this.checked)'>
    全选</td>
  <td width="645"></td>
</tr>
<tr>
  <td class="td_title_find"  colspan="3">${program_nm}</td>
</tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
<tr class="left_topbg">
  <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>应用</strong></td>
  <td class="td_title_text" style="text-align:left"><input name="" type="checkbox" value="" style="vertical-align: auto" checked="checked" onclick='Pn.checkbox("program",this.checked)'>
    全选</td>
  <td width="645"></td>
</tr>
<tr>
  <td class="td_title_find"  colspan="3">${program}</td>
</tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
<tr class="left_topbg">
  <td  width="60"  class="td_sql_text" style="vertical-align:middle; text-align: right"><strong>影响行数</strong></td>
  <td class="td_title_text" style="text-align:left"><input name="" type="checkbox" value="" style="vertical-align: auto" onclick='Pn.checkbox("sum",this.checked)'>
    全选</td>
  <td width="645"></td>
</tr>
<tr>
  <td class="td_title_find"  colspan="3"><input name="sum" type="checkbox" value="" style="vertical-align: auto">
    查询超过100行
    <input name="sum" type="checkbox" value="" style="vertical-align: auto">
    更新超过10行
    <input name="sum" type="checkbox" value="" style="vertical-align: auto">
    删除超过10行 </td>
</tr>
</table>
<table width="100%" border="0" border="0" cellpadding="0" cellspacing="0">
<tr class="left_topbg">
  <td class="td_sql_text" style="vertical-align:middle; text-align: left"><input name="button" type="button" value="搜索" onclick="Create('result','<%=Constants.PREFIX_PATH%>/SourceAndTargetAction.do?opt=resultAction&&type=2','分析结果')" /></td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table></form>
</body>
</html>
